<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>登录</title>
<meta name="keywords" content="keyword1,keyword2,keyword3">
<meta name="description" content="this is my page">
<meta name="content-type" content="text/html; charset=UTF-8">
<script th:src="@{/js/jquery-2.2.4.min.js}"></script>
<script th:src="@{/js/jquery.timers-1.1.2.js}"></script>
<script th:src="@{/js/utils.js}"></script>
<link th:href="@{/plugin/boostrap/css/bootstrap.min.css}"
	rel="stylesheet" />
<link th:href="@{/css/main.css}" rel="stylesheet" />
<script th:src="@{/plugin/boostrap/js/bootstrap.min.js}"></script>
<style>
<!--
-->
</style>
</head>
<body style="background-color: #6f5499;">
	<div class="input-group"
		style="display: block;width: 500px;margin: 250px auto;">
		<input type="text" id="account" class="form-control" placeholder="用户名"
			style="width: 200px;height: 45px;"> <input type="password"
			id="password" class="form-control" placeholder="密码"
			style="width: 200px;height: 45px;"> <span
			class="input-group-btn">
			<button class="btn btn-success btn-lg" id="btn-login" type="button">登录</button>
		</span>
	</div>

	<div class="api" style="text-align: center;">
		<a th:href="@{/swagger-ui.html}" style="color: white;">Swagger2
			API文档</a>
	</div>
</body>
<script type="text/javascript">
	$("#btn-login").click(function() {
		$springboot.post("/login/login", {
			account : $("#account").val(),
			password : $("#password").val()
		}, function(rs) {
			console.log(rs)
			if (rs.status) {
				location.href = $springboot.getContextPath() + "/home/main1.html";
			} else {
				$springboot.msg(rs.data);
			}
		});
	});
</script>
</html>
